/*
 * Docking.h
 *
 *  Created on: 2017年5月25日
 *      Author: roswiki
 */

#ifndef KATRINA_GUI_INCLUDE_KATRINA_GUI_DOCKING_H_
#define KATRINA_GUI_INCLUDE_KATRINA_GUI_DOCKING_H_

#include <ros/ros.h>
#include <std_msgs/UInt32MultiArray.h>
#include <std_msgs/Bool.h>
#include <geometry_msgs/Twist.h>

namespace Katrina
{
    class Docker
    {
        public:
            Docker();
            virtual ~Docker();

        private:
            void irStateCallback(const std_msgs::UInt32MultiArrayConstPtr &msg);
            void startCallback(const std_msgs::BoolConstPtr &msg);
            void docking();
            void done();
            ros::NodeHandle nh_;
            ros::Subscriber ir_state_sub_;
            ros::Publisher cmd_pub_;
            ros::Subscriber start_sub_;
            ros::Publisher finish_pub_;
            std::vector<unsigned int> ir_state_;
            ros::Rate rate_;
            bool has_ir_;
            double linear_vel_;
            double angular_vel_;
            bool anti_clock_;
            ros::AsyncSpinner asp_;
    };
}

#endif /* KATRINA_GUI_INCLUDE_KATRINA_GUI_DOCKING_H_ */
